import React, { Component } from 'react'
import Maincontext  from './context'
export class world extends Component {
  // 拿到context上的值放到this上面
  // static contextType = Maincontext
 render() {
    return (
      <div className='s'>
        <h3>孙子组件</h3>
        world {this.context}
        </div>
    )
  }
}
// 也可以这样去拿context上的值放到this上面
world.contextType = Maincontext
export default world